package com.api.tournament.dao;

import com.api.core.ApiMapper;
import com.api.tournament.model.RoundLog;
import com.api.tournament.vo.RoundLogVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface RoundLogMapper extends ApiMapper<RoundLog> {
    List<RoundLogVo> selectByStageId(Long stageId, int type, Integer tournamentType);
    List<RoundLogVo> selectByStageIdFree(Long stageId, int type);

    void deleteByTournamentId(Long tournamentId);

    List<RoundLog> selectByRound(Long roundId, int type);
    List<RoundLog> selectByStage(Long stageId, int type);

    void deleteByByStageId(Long stageId);

    /**
     * 查询 某组 还没有完成的对战
     * @param groupName
     * @param isResult 是否完成
     * @return
     */
    List<RoundLog> selectByGroupNoResult(String groupName, Long stageId,boolean isResult);

    /**
     * 查询阶段是否还有未完成的比赛
     * @param stageId
     * @return
     */
    List<RoundLog> selectByStageNoResult(Long stageId);
}